Can’t create menus for program “xxx” because menus disappear
Microsoft Excel, MacDraft, MacDraw and some other program will “take down” all menus except Apple, File, and Edit whenever a desk accessory is open (such as the Control Panel). This makes it somewhat difficult to create Menu/DA QuicKeys!
Solutions:
1) Use the “TEXT” item on QuicKeys DEFINE menu, type in EXACTLY the name of the menu item or DA you want, select the “Menu” or “DA” radio button rather than the “Text” Radio button before you click OK. This will create the appropriate Menu or DA QuicKey.
NOTE: You may need to cut off the name of the menu item, because some programs MODIFY menu items during operation. For example, some programs modify “Undo” to say “Undo (last action)”. In this case, when typing in the text to create the menu item key, just type in “Undo”. QK will find the right one.
NOTE 2: If you shorten the item name TOO MUCH, and you have another item that starts out the same, you may accidentally pick the wrong one because the shortened name matches BOTH menu items, even if they are on separate menus.
2) If they have version 1.1 of QK, they can use the RECORDER funtion, which will create a MENU QuicKey if the user clicks and selects from the menu bar when the recorder is on. NOTE: The QuicKeys created when the recorder is on go into the UNIVERSAL set until that is full, then they go into the Program set of the program you are running. If necessary, you can cut and paste the QuicKeys the recorder created from the universal set into the program set.
3) Use the QuickPanel, which is not a desk accessory and so does not cause the menus to disappear.
Title: Text Keys & Control-C
Number: QK004
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Typing the Control-C key when defining a TEXT QuicKey seems to dismiss the TEXT key creation dialog box. It does create a TEXT quickey though.
(NOTE: There are also somewhat obvious problems with using CONTROL-H (backspace/delete)
Title: XPress & QK Clicks
Number: QK005
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: XPress 1.1
Problem with Xpress 1.1; click keys “stick” or don’t work, for example, setting up a click on a tool. Seems to occur either on an SE or a II
WORKAROUND: Xpress seems to be kind of “modal”. If an object is selected it handles QuicKeys differently, it seems. One approach to allow clicking on tool icons is to set up a seq. that (1) clicks the icon and (2) clicks elsewhere - up in the menu bar over in the right one-third (past the utilities) menu seems to work. Weird.
Title: Close Mousies and SuperPaint
Number: QK006
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: SuperPaint
Close Mousies don't work in SuperPaint when the Tool Pallet is showing. The Toolbox is a "floating" window that is always the front window. - That's why the Close Key doesn't close the Paint window.
If you Hide the Toolbox, the Close key will work OK.
Title: QuicKeys Tips #1
Number: QK008
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Running into 100-key limitation on number of keystrokes or the 30-key limit in sequences?
Here are some suggestions for reducing number of keys used, especially in sequences:
Using EXISTING keyboard shortcuts where possible:
o Command-Uparrow in Open and Save dialogs backs you up a folder level
o Enter is the same as “OK” or the “outlined”/default button in most cases.
o Command-Period (.) is often the same as Cancel, especially in OPEN and SAVE dialog boxes.
o Tab is the same as the DRIVE button in open and save dialog boxes.
o Pre-defined command-key equivalents (use literals to access these sequences)
o Use ENTER instead of OK (or “default”) button keys
o Use literals instead of text QuicKeys in sequences where feasible.
o Use DialogKeys in sequences with literals - it works, try it!
o If you run out of application-specific keys, use Univeral keys (just make sure that you don’t have program-specific and Universal keys that are assigned to the same keystroke.
Title: Cmd-Shift-Number Keys
Number: QK010
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: System Software
Does QK 1.1 (or the QuickPanel) disallow the use of command-shift-number keys being assigned to QK actions?
IT doesn't, but with the SE or ][, pressing those keys executes the FKEY, rather than letting QuicKeys see it!
Title: 4th Dimension Tip
Number: QK023
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: 4D
4th Dimension & QuicKeys
Set the HELP key on the extended keyboard set up to type in an "@" sign followed by <RETURN> to activate 4D's ability to display a list of possible choices when in a linked field.
Title: HyperDrive MFS Drawers
Number: QK025
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: HyperDrives
HyperDrive MFS Drawers and QuicKeys
On the old internal Hypdrives (not the FI-40), with an MFS startup drawer, there might be some incompatiblity with installing keysets into QuicKeys; it just doesn't appear to work. You can set up keys OK, at least in the universal set, but attempting to install a keyset with QuickAccess doesn't appear to work (yes, they installed it with exactly the same name as the application). Changing the startup "drawer" (volume) from MFS to HFS seems to fix things.
Title: HyperCard and QK
Number: QK027
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: HyperCard
HYPERCARD & QUICKEYS
HyperCard can turn off the menu bar. Any Menu quickeys will not work or will be delayed until the menu bar is turned back on. Also, HyperCard does strange things with the “modifier” keys, especially COMMAND-OPTION. These may interfere with QuicKeys.
Title: Turning Off QuicKeys Icons
Number: QK029
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Turning Off QuicKeys Icons:
The icons that QuicKeys displays on startup MAY cause a bomb on Mac II's or external large-screen monitors such as the Radius Full Page Display (FPD) or the E-Machines Big Picture, etc. This problem should be fixed, at least for Mac II's, in the 1.1 release of QK. There might still be some problems with large screen monitors.
Display of the icon maybe turned off in the control panel, of course, OR by pressing the OPTION key during system startup.
Title: QuicKeys Tips #2
Number: QK031
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: DiskTop
TIP: Many people start DiskTop with a FIND
So set up a QK sequence to :
- Open DiskTop
- Select FIND button
Assign it to a key, such as Command-Option-F or Command-Shift-F, to follow the DiskTop key conventions.
Title: QuicKeys Info. #1
Number: QK032
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
FYI: How much space does QK take up?
QK takes up about 90K + 5K pre application of disk space
QK takes about 64K of heap space no matter how many apps.
FYI: When QK preses two keys with the same modifiers (like cmd opt x and cmd opt y) it lets the command and option keys up between key presses, i.e. (cmd opt x) (cmd opt y) not (cmd opt x y)
Title: QuicKeys 1.1 Info
Number: QK033
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
QuicKeys 1.1
QuicKeys 1.1 offers several major improvements for both QuicKeys and Quick Access.
QuicKeys has seven new features (and one change)
Improved MultiFinder compatibility- QuicKeys is now totally compatible with Apple's MultiFinder,
QuickPanel- a new specials action which brings up the QuicKeys window without having to access the Control Panel.
Recorder on/off- a new Specials action which lets you define clicks/drags and menu selections without having to access the Control Panel. Recorder on/off works much like a watch me action. Once you've assigned a keystroke to this action, the first press will turn the recorder on (the cursor becomes a microphone) and the next press will turn the recorder off.
While the recorder is on, any click, drag or menu selection is automatically recorded as a QuicKeys action. You will need to open the QuicKeys window to assign keystrokes to these actions.
When you select a menu item, while recording, QuicKeys will convert that click and drag into the text of the menu if possible. You may hold down the shift key if you do not want the menu click and drag converted into the menu's text. If a Menu contains icons, that action will remain a click and a drag.
Open set and save set- these new Edit menu selections let you load in or save a QuicKeys set while in the QuicKeys window.
Read set from disk is no longer on the Specials menu. (This item was changed to Open set and moved to the Edit menu.) Note: If you have a keystroke assigned to this action in QuicKeys 1.0, your keystroke will now be listed as Recorder on/off when you upgrade to QuicKeys 1.1.
Editing of QuicKeys within the QuicKeys program- simply double click on the QuicKey in the QuicKey window and you can modify Text, Menu/DA, Alias, Clicks and Sequences.
Cutting, Copying, and Pasting QuicKeys- using these commands on the regular Edit menu, QuicKeys can be moved between universal and program specific sets, (QuickPanel has buttons to let you cut, copy, paste and clear QuicKeys.)
Enhanced Clicks feature-QuicKeys lets you use shift, command, control and option keys with clicks and drags.
Quick Access has added two new features:
Configure International Resources- a Special menu selection to allow you to have up to four different terms for Quit, Shut down, Restart, and Open. These can be used to let QuicKeys recognize other terms for each of these actions.
Open other QuicKeys file- a Special menu selection to let you read in all of the QuicKeys sets in a QuicKeys file and then install those sets into another file. (Used to upgrade from one version of QuicKeys to another.)
Title: Editing QuicKeys
Number: QK034
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Editing of QuicKeys within the QuicKeys program- simply double click on the QuicKey in the QuicKey window and you can modify Text, Menu/DA, Alias, Clicks and Sequences.
Title: New QuickAccess Features
Number: QK035
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Quick Access has added two new features:
Configure International Resources- a Special menu selection to allow you to have up to four different terms for Quit, Shut down, Restart, and Open. These can be used to let QuicKeys recognize other terms for each of these actions.
Open other QuicKeys file- a Special menu selection to let you read in all of the QuicKeys sets in a QuicKeys file and then install those sets into another file. (Used to upgrade from one version of QuicKeys to another.)
Title: Date QuicKeys and Sys 6.0
Number: QK036
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: System Software
4 of the 8 date QuicKeys will not work correctly under System 6.0.
This has been fixed in System 6.0.1
Title: QK Tech Stuff
Number: QK041
Date: 9/12/88
Author: Donald Brown
CES Product: QuicKeys
Other Product: Misc.
Technical information
This information is only for the most technical of people. It is designed for programmers wanting guidelines for being QuicKeys-compatible or QuicKeys-friendly, or the technically curious.
Determining if QK is active
We’ve implemented a standard method for programs to find non-relocatable blocks in the system heap in such a way that no one will ever “find” another persons block. The block must begin with the bytes of $A89F 1234, the creator signature of the associated product, and optionally another long word for version number. We recommend the use of the standard for everyone who needs to keep and find blocks of data permanently.
QuicKeys has a signature of ‘CELN’ and a version number of 1, so the routine given in Listing 1 will find us.
This will merely tell you whether QuicKeys has been loaded or not. Unfortunately, there is no way for a program to tell whether QuicKeys has been disabled by the user or not
Disabling QuicKeys
You can temporarily disable QuicKeys by clearing the byte at $2F8 (ScrDmpEnb), re-enable it by setting the byte at $2F8 to $FF. Note that the QuicKeys cdev automatically clears that byte when it is opened, and sets it when the cdev is closed.
Useful routines you can call
Once you have found the QuicKeys block, there are routines you can call to add power to your programs, as well as modifying the QuicKeys keysets if desired. FindSysHeap (Listing 1) returns a pointer to the header bytes of the block where QuicKeys resides. Use the following offsets (given in decimal) to find the data/routines.
Pass name, DirID, and vrefnum of application; name, DirID, vrefnum, and type of document (document name should be “” for just launching an application).
Pass “” for application name and “SHUT” for document type to do a shutdown, “” for application name and “SHRS” for docuument type to do a restart.
28:Function FindAnApp(VAR apname:str255; VAR apdir:longint; VAR apvref:integer; VAR docname:str255; Var docdir:longint; VAR docvref:integer; VAR doctype:ResType; lookhard:boolean):boolean;
Pass the document name, directory ID, vrefnum, and type to look for, it returns the application name, directory ID, and vrefnum if the function result is true. (If false, couldn’t find an owning application).
If “LookHard” is false, QK only looks for a menu resource created by DiskTop, and only looks there for an owning application
48:Procedure PlotAnItem(thekey:AKey; r:rect);
Pass on the stack a pointer to the key to print, and a pointer to the rectangle, QK will print the key into the current port in the rectangle r, using current font and style.
56:Table of 100 Universal keys (format is given in Listing 2)
7856:Table of Application keys (format is given in Listing 2)
Patched Traps
QuicKeys patches several traps in order to execute the user’s commands. The traps patched are:
OpenResFile: used after quitting a program to see if we’re about to open the Finder, for the switch-launching
GetOSEvent,OSEventAvail: used to intercept user keydowns and transform them into other events, also used for moving the mouse in clicks & drags, and doing the “typing” for text/date/time.
MenuSelect: used to make menu/DA selections
GetNextEvent: used to process “delayed” QuicKeys (see below)
Button: used to indicate the button being “down” during drags
GetKeys: used to clear any modifiers during clicks & drags.
Data file formats
QuicKeys uses two kinds of data files, key sets and templates.
KeySets are simply binary images of the Universal or Application-specific key tables (see above and Listing 2 for more detail). The image is stored in the data fork of the file. The file has a type of QCKY and a creator of GDGT.
Printing templates are resource files that describe a key layout to print keys with. A template must have a QTMP (0) resource that describes the key layout, the format for the resource is given in Listing 3. If you wish to control whether the template should be printed tall or wide and where the page boundries should occure, you can include a QTFM (0) resource, whose format is given in Listing 4. A template file should have a type of QKTP and a creator of GDGT.
How it does things
QuicKeys does a fairly good job of fooling applications into thinking a real human is in control. However, depending on how a program is written, problems can occur. The following brief description of how QuicKeys executes its commands may help programmers write QuicKey-friendly programs.
Menu/DA Selections
Post mousedown in the menu bar
When application calls MenuSelect, menuselect searches menus left to right, top to bottom, for a menu item that BEGINS WITH the string given and is not disabled.
Launching
If in the Finder, fool the Finder into thinking it’s in the Switcher and use the Menu Selection routine (above) to issue a “Shut” command (which the Finder will treat as “Quit” while it’s in the Switcher), else use the Menu Selection routine to issue a “Quit” command.
EXCEPTION: If the application keyset has a definition for command-shift-option-Q, that command will be executed instead (for things without menus such as Font/DA Mover, or for programs that don’t call MenuSelect
When OpenResFile is called to open the next application after quitting (usually the Finder), QK will abort the OpenResFile call and do a _Launch of the new application
Typing
QK has a string in memory. At every GetOSEvent or OSEventAvail call where keyboard events are permitted, QK will first check the string to see if it is null. If it is not, QK gets the first character, looks up to see what the appropriate keycode is, and forms the appropriate event. (If GetOSEvent was called, QK also removes that character from the string).
Clicks and Drags
When doing a click and drag, QK records the current location, then moves to the click location on the screen and posts a mousedown. It starts an internal counter at 30 which gets decremented on every call to Button, GetOSEvent, and OSEventAvail.
When the counter reaches 20, the mouse is moved to the drag position
When the counter reaches 10, the button is released
When the counter reaches 0, the mouse is moved back to the original position
During the click and drag, any events returned by GetOSEvent/OSEvent except Key related events will have the modifiers cleared, and GetKeys will not show any modifier keys as being down.
If the QK is a multiple-click, QK starts by cycling through the range of 19-0 for the extra clicks, before starting the full click (so that the multiple clicks occur before the drag, rather than after).
Delayed events
Most actions are detected during the GetOSEvent and OSEventAvail trap, and are transformed at that time. However, there are a few actions (such as typing dates and time, doing a transfer, quick-reference sheet, select second window, select rear window, and FKEYs) that move/allocate memory. Since that is not permitted during GetOSEvent/OSEventAvail, the key is delayed to be evaluated during the next GetNextEvent. Programs that never call GetNextEvent will not have these keys executed!
Also, under MultiFinder, >every< key is delayed to take place during the next GNE, since lower levels are not guaranteed to be in the current application.
Title: About FixQuick
Number: QK042
Date: 9/12/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: List Manager
The FixQuick application program is designed to fix a VERY obscure problem with QuicKeys and the “List Manager” software that Apple supplies in the Macintosh’s ROM chips (which QuicKeys uses to display its list of QuicKeys).
Because this is a very obscure problem, this is not a guaranteed correction. If you continue to have problems with QuicKeys after running FixQuick, PLEASE call us and let us know - that’s the only way we’ll be able to fix the problem!
--------------------
HOW TO USE FIXQUICK
--------------------
Copy the FixQuick application icon onto the disk that contains the copy of QuicKeys you wish to repair. Double-click the FixQuick application icon.
QuicKeys will be repaired.
Title: Source Code
Number: QK047
Date: 10/24/88
Author: Dave Loverink
CES Product: QuicKeys
Other Product: None
Format of an individual key:
0: keycode and ascii value as returned by GetNextEvent
2:Modifiers as returned by GetNextEvent, all but option, shift, control, and command modifiers masked out
4:Integer giving the type of QK
(0) - unused
(1) - File
6:Pascal string giving file name
38:Pascal string giving volume name
70:Directory ID
74:File type
(2) - Text
6:Pascal string giving text to type
(3) - Menu
6:Pascal string giving menu item to look for
(4) - Desk Accessory
6:Pascal string giving menu item to look for (starts with a null character)
(5) - Other
6:Integer giving other command:
(0) - Line up
(1) - Line down
(2) - Page up
(3) - Page down
(4) - Home
(5) - End
(6) - Column left
(7) - Column right
(8) - Page left
(9) - Page right
(10) - Close window
(11) - Zoom window
(12) - Transfer
(13) - Shut down
(14) - Restart
(16) - Select rear window
(17) - Select second window
(18) - QuickQuotes
(19) - Double QuickQuotes
(20) - Quick reference
(21) - Toggle QuicKeys on/off
(22) - Read keys from disk
(23) - 6/22/87
(24) - Monday, June 22, 1987
(25) - Mon, Jun 22, 1987
(26) - June 22, 1987
(27) - Jun 22, 1987
(28) - 22 June 1987
(29) - 22 Jun 1987
(30) - 87/06/22
(32) - Time/minutes
(33) - Time/seconds
(101-up) - FKEY # (value-100)
(6) - Alias
6:Integer of replacement keycode/ascii value
8:Integer of replacement modifiers
(7) - Click
6:Pascal string of title of click
34:Pascal string of window to look for
62:Number of clicks (integer)
64:Look for specific window (boolean)
66:MouseUp format
(0) Absolute screen position
(1) Relative to current (mousedown) position
(2) In window local coordinates
(4) Relative to Upperleft corner
(5) Relative to UpperRight corner
(6) Relative to Lowerleft corner
(7) Relative to LowerRight corner
68:MouseUp Point
72:MouseDown format (as MouseUp format)
74:MouseDown point
(8) - Sequence
6:Pascal string of name
18:Array[1..30] of integers of steps in the sequence
HiByte:KeyCode
LowByte:Modifiers
(9) - Button
6:Pascal string of name of control to search for
----------------
;
; FindSysHeap--Hits A0/A1/D0, returns D0=0 if not found,
; D0=$100 and 8(A0) pointing to to start of init if found
;
FindSysHeapmove.LSysZone,A1;point A1 at the header
LEAheapData(A1),A0;point A0 at the first block
@0Cmp.LbkLim(A1),A0;are we done?
BGE.s@998
move.B(A0),D0;see if it's nonrelocatable
AndI.W#$C0,D0
Cmp.W#$40,D0
BNE.S@800;if not, next block
move.L8(A0),D0
Cmp.L#$A89F1234,D0
BNE.S@800
move.L12(A0),D0
Cmp.L#'CELN',D0
BNE.S@800
tst.L16(A0)
BNE.S@800
move.W#$100,D0
RTS
@800move.L(A0),D0;point A3 to the next block
AndI.L#$FFFFFF,D0;strip of header
Add.LD0,A0;add to A3
BRA.S@0;and loop back!
@998Clr.WD0;search failed, so return false
@999RTS
------------------------
type 'QTMP' {
rect;/* rectangle to go in */
integer = $$Countof(TempArray);
array TempArray {
rect; /* box to go in */
switch {
case eof:
key integer = 0;
case Text:
key integer = 1;
integer;/*just*/
integer;/*font*/
integer;/*size*/
integer;/*Style*/
pstring;
case Key:
key integer = 2;
integer;/*font*/
integer;/*size*/
integer;/*keycode*/
case Recttype:
key integer = 3;
integer;/*penwidth*/
integer;/*Rounding*/
case Icontype:
key integer = 4;
integer;/*iconID*/
case Pictype:
key integer = 5;
integer;/*iconID*/
case Linetype:
key integer = 6;
integer;/*penwidth*/
};
align word;
};
};
-------------------------
type 'QTFM' {
integer;/* 1 to force wide */
integer = $$Countof(TempArray);
array TempArray { rect; }; /* rectangle for pages*/
};
Title: Icon Display Order
Number: QK049
Date: 10/24/88
Author: Bill Davis
CES Product: QuicKeys
Other Product: None
Several people have called us wanting to know (for technical reasons) when the QuicKeys icon appears during startup - before or after QuicKeys itself is loaded.
The answer: BEFORE QuicKeys is loaded (but not by much...)